From 9bf4af1946e3fabd2cc4eabaf990eb837d557418 Mon Sep 17 00:00:00 2001 From: "iap10@freefall.cl.cam.ac.uk" Date: Tue, 8 Mar 2005 14:07:57 +0000 Subject: [PATCH] bitkeeper revision 1.1236.13.1 (422db1bdZ6ZohI27rSF1Yo3Q91_REw) Return mfn of m2p table correctly. --- linux-2.6.10-xen-sparse/drivers/xen/privcmd/privcmd.c | 2 +- linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/page.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/linux-2.6.10-xen-sparse/drivers/xen/privcmd/privcmd.c b/linux-2.6.10-xen-sparse/drivers/xen/privcmd/privcmd.c index c97fe7cf21..9c57aaf3a1 100644 --- a/linux-2.6.10-xen-sparse/drivers/xen/privcmd/privcmd.c +++ b/linux-2.6.10-xen-sparse/drivers/xen/privcmd/privcmd.c @@ -177,7 +177,7 @@ static int privcmd_ioctl(struct inode *inode, struct file *file, unsigned long m2pv = (unsigned long)machine_to_phys_mapping; pgd_t *pgd = pgd_offset_k(m2pv); pmd_t *pmd = pmd_offset(pgd, m2pv); - unsigned long m2p_start_mfn = pmd_val(*pmd) >> PAGE_SHIFT; + unsigned long m2p_start_mfn = pmd_val_ma(*pmd) >> PAGE_SHIFT; ret = put_user(m2p_start_mfn, (unsigned long *)data) ? -EFAULT: 0; } break; diff --git a/linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/page.h b/linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/page.h index 6215a5b018..ec9fdfed0e 100644 --- a/linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/page.h +++ b/linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/page.h @@ -110,6 +110,7 @@ static inline unsigned long pmd_val(pmd_t x) if (ret) ret = machine_to_phys(ret); return ret; } +#define pmd_val_ma(x) ((x).pmd) #define pgd_val(x) ({ BUG(); (unsigned long)0; }) #define pgprot_val(x) ((x).pgprot) -- 2.30.2